package edu.nf.service.impl;


import edu.nf.beans.annotations.Component;
import edu.nf.beans.annotations.Inject;
import edu.nf.dao.MatchDepartmDao;
import edu.nf.exception.QueryException;
import edu.nf.service.MatchDepartmService;

import java.util.List;
import java.util.Map;

@Component("matchDepartmService")
public class MatchDepartmServiceImpl implements MatchDepartmService {

    @Inject(beanName = "matchDepartmDao")
    private MatchDepartmDao dao;

    @Override
    public List<Map<String, Object>> matchDepartmById(String departmId) {
        try{
            return dao.matchDepartm(departmId);
        }catch (RuntimeException e){
            throw new QueryException("match fail");
        }
    }
}
